package com.pig.graduate.domain.event;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pig.graduate.domain.BaseEntity;
import com.pig.graduate.domain.CustomDateTimeSerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 离场
 * @TableName event_exit
 */
@TableName(value ="event_exit")
@Data
public class EventExit extends BaseEntity implements Serializable {

    /**
     * 离场日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING ,pattern ="yyyy-MM-dd HH:mm:ss")
    private Date exitDate;

    /**
     * 耳号
     */
    private String earCode;

    /**
     * 所在栋舍
     */
    private Long buildingsId;
    @TableField(exist = false)
    private String buildingsName;

    /**
     * 所在位置
     */
    private Long columnId;
    @TableField(exist = false)
    private String columnName;

    /**
     * 所在位置
     */
    @TableField(exist = false)
    private String location;
    /**
     * 数量
     */
    private Integer number;

    /**
     * 重量
     */
    private Double weight;

    /**
     * 金额
     */
    private BigDecimal price;

    /**
     * 头单价
     */
    private BigDecimal unitPrice;

    /**
     * 离场类型
     */
    private String exitType;

    /**
     * 离场原因
     */
    private String exitCause;

    /**
     * 离场类型(筛选猪)
     */
    private Integer exitPigType;

    /**
     * 猪群号
     */
    private String herdsPigsCode;

    /**
     * 操作人员
     */
    private Long operatorsUser;
    @TableField(exist = false)
    private String operatorsUserName;

    @TableField(exist = false)
    private Date startExitTime;

    @TableField(exist = false)
    private Date endExitTime;
    /**
     * 主体数据（种猪 肉猪）
     */
    @TableField(exist = false)
    private List<Long> ids;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}